<template>
    <div>
        <child ref="ref_child">
            <p>我是父组件设置的slot中的内容</p>
            <p slot="header">我是父组件设置的slot中的header内容</p>
        </child>

        <br/>
        <br/>
        <br/>
        <br/>

        <child ref="ref_child2">
            <template slot="content" scope="props" >
                <p >获取子组件的msg的值：{{ props.msg }}</p>
            </template>
        </child>
    </div>
</template>
<script>
    import Child from '@/views/slot/Child.vue';
    export default {
        components: {
            Child
        },
        props: {

        },
        data () {
            return {
                childMessage: ""
            }
        },
        mounted(){

        },
        /**
         * 计算属性
         */
        computed: {

        },
        methods: {

        }
    }
</script>
<style scoped>

</style>